home *** CD-ROM | disk | FTP | other *** search
/ Creative Computers / Creative Computers CD-ROM, Volume 1 (Legendary Design Technologies, Inc.)(1994).iso / commercial / inovatronics / edgedemo / edgeeditor / rexx / menu_evaluatecolumn.edge < prev    next >
Text File  |  1994-11-17  |  718b  |  32 lines

  1. /*
  2. ** $VER: Menu_EvaluateColumn.edge 1.0 (Tuesday 23-Aug-94 11:24:12)
  3. **
  4. ** Copy, evaluate/total the lines and put the result into local paste
  5. **
  6. ** Written by Inovatronics
  7. */
  8.  
  9. options results
  10. value=0
  11.  
  12. /* copy the current block into the result buffer */
  13. copy resultbuff
  14. if rc==0 then do
  15.     
  16.     /* remember the results */
  17.     data=translate(result,' 'd2c(10),d2c(10)' ')
  18.     
  19.     /* loop thru and accumulate the results */
  20.     do cnt=1 to words(data)
  21.         expr='expr='compress(translate(word(data,cnt),' 'd2c(10),d2c(10)' '))
  22.         interpret expr
  23.         value=value+expr
  24.     end
  25.     
  26.     /* if there were no errors then the result in the local paste buffer*/
  27.     if rc==0 then do
  28.         'putenvvar fe_smallclip "'value'"'
  29.         'putenvvar fe_smallcliptype 0'
  30.     end
  31. end
  32.